home *** CD-ROM | disk | FTP | other *** search
- #include <condefs.h>
- #include <fstream.h>
- #include <conio.h>
- #pragma hdrstop
-
- int main(int, char **)
- {
- char buff[80];
- ifstream infile;
- infile.open("readfile.cpp");
- if (!infile) return 0;
- while (!infile.eof()) {
- infile.getline(buff, sizeof(buff));
- cout << buff << endl;
- }
- infile.close();
- cout << endl << "Press any key to continue...";
- getch();
- return 0;
- }
-
-